package com.model.dao;

// Generated Sep 16, 2013 2:49:26 PM by Hibernate Tools 4.0.0

import static javax.persistence.GenerationType.IDENTITY;

import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;

import com.model.dao.UserRoleTable;

/**
 * UserTable generated by hbm2java
 */
@Entity
@Table(name = "user_table", catalog = "shoppingcart_schema", uniqueConstraints = @UniqueConstraint(columnNames = "mobileno"))
public class UserTable implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -1627532021591474316L;
	private Integer iduserTable;
	private String mobileno;
	private String password;
	private String name;
	private String houseno;
	private String street;
	private String area;
	private String landmark;
	private String city;
	private String email;
	private Set<OrderTable> orderTables = new HashSet<OrderTable>(0);
	private GooglemapsTable googlemapsTable;
	private Set<UserRoleTable> userRoleTables = new HashSet<UserRoleTable>(0);

	public UserTable() {
	}

	public UserTable(String mobileno) {
		this.mobileno = mobileno;
	}

	public UserTable(String mobileno, String password, String name,
			String houseno, String street, String area, String landmark,
			String city, String email, Set<OrderTable> orderTables, GooglemapsTable googlemapsTable,Set<UserRoleTable> userRoleTables) {
		this.mobileno = mobileno;
		this.password = password;
		this.name = name;
		this.houseno = houseno;
		this.street = street;
		this.area = area;
		this.landmark = landmark;
		this.city = city;
		this.email = email;
		this.orderTables = orderTables;
		this.googlemapsTable = googlemapsTable;
		this.userRoleTables = userRoleTables;
	}

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	@Column(name = "iduser_table", unique = true, nullable = false)
	public Integer getIduserTable() {
		return this.iduserTable;
	}

	public void setIduserTable(Integer iduserTable) {
		this.iduserTable = iduserTable;
	}

	@Column(name = "mobileno", unique = true, nullable = false, length = 10)
	public String getMobileno() {
		return this.mobileno;
	}

	public void setMobileno(String mobileno) {
		this.mobileno = mobileno;
	}

	@Column(name = "password", length = 45)
	public String getPassword() {
		return this.password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	@Column(name = "name", length = 45)
	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Column(name = "houseno", length = 45)
	public String getHouseno() {
		return this.houseno;
	}

	public void setHouseno(String houseno) {
		this.houseno = houseno;
	}

	@Column(name = "street", length = 45)
	public String getStreet() {
		return this.street;
	}

	public void setStreet(String street) {
		this.street = street;
	}

	@Column(name = "area", length = 45)
	public String getArea() {
		return this.area;
	}

	public void setArea(String area) {
		this.area = area;
	}

	@Column(name = "landmark", length = 45)
	public String getLandmark() {
		return this.landmark;
	}

	public void setLandmark(String landmark) {
		this.landmark = landmark;
	}

	@Column(name = "city", length = 45)
	public String getCity() {
		return this.city;
	}

	public void setCity(String city) {
		this.city = city;
	}

	@Column(name = "email", length = 45)
	public String getEmail() {
		return this.email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "userTable")
	public Set<OrderTable> getOrderTables() {
		return this.orderTables;
	}

	public void setOrderTables(Set<OrderTable> orderTables) {
		this.orderTables = orderTables;
	}
	
	@OneToOne(fetch = FetchType.LAZY, mappedBy = "userTable")
	public GooglemapsTable getGooglemapsTable() {
		return this.googlemapsTable;
	}

	public void setGooglemapsTable(GooglemapsTable googlemapsTable) {
		this.googlemapsTable = googlemapsTable;
	}
	
	@OneToMany(fetch = FetchType.LAZY, mappedBy = "userTable")
	public Set<UserRoleTable> getUserRoleTables() {
		return this.userRoleTables;
	}

	public void setUserRoleTables(Set<UserRoleTable> userRoleTables) {
		this.userRoleTables = userRoleTables;
	}
}
